1. Field of the Invention
The present invention relates to a physical quantity sensor.
2. Description of the Related Art
A conventional magnetic sensor is described as an example of a physical quantity sensor. FIG. 6 is a circuit diagram illustrating the conventional magnetic sensor.
First, a signal S1 is controlled to a high level and a signal S2 is controlled to a low level. A signal S1X is an inverted signal of the signal S1. A signal S2X is an inverted signal of the signal S2. When a PMOS transistor 90 and an NMOS transistor 93 are turned on, a bias current flows through a magnetic detection element 98 between the transistors. As a result, a voltage Va which is a sum of a Hall voltage Vh based on the bias current and a magnetic field applied to the magnetic detection element 98 and an offset voltage Voh of the magnetic detection element 98 is generated between a first terminal and a fourth terminal of the magnetic detection element 98. The voltage Va is expressed by the following Expression (11).Va=+Vh+Voh  (11)
In this case, switches 94 and 95 are in an on state, and hence the voltage Va is input to an amplifier 99.
Next, the signal S1 is controlled to a low level. The signal S1X is controlled to a high level. The signal S2 is controlled to a high level. The signal S2X is controlled to a low level. Then, switching is performed so that a bias current flowing between a second terminal and a third terminal of the magnetic detection element 98 flows between the fourth terminal and the first terminal. In addition, switching is performed so that the Hall voltage Vh generated between the fourth terminal and the first terminal of the magnetic detection element 98 is generated between the third terminal and the second terminal. At this time, a voltage Vb is expressed by the following Expression (12).Vb=−Vh+Voh  (12)
In this case, switches 96 and 97 are in an on state, and hence the voltage Vb is input to the amplifier 99.
After that, the voltages Va and Vb which are amplified by the amplifier 99 are subjected to subtraction processing performed by an operating circuit (not shown) to cancel out the offset voltage Voh (see, for example, Japanese Patent Application Laid-open No. 2009-002851).
When the voltage Va is generated in the magnetic sensor as described above, leakage currents flow through the PMOS transistor 91 and the NMOS transistor 92 which are each in an off state. When the voltage Vb is generated, leakage currents flow through the PMOS transistor 90 and the NMOS transistor 93 which are each in an off state.
Even when the PMOS transistors 90 and 91 are manufactured in the same size and the NMOS transistors 92 and 93 are manufactured in the same size, the leakage currents vary because of semiconductor manufacturing variations. As a result, the offset voltages Voh cannot be cancelled out appropriately, and hence the magnetic detection precision of the magnetic sensor reduces.